import 'package:flutter/material.dart';
import '../page/main/main_page.dart';

class RouteConfig {
  static const String home = '/';
  static const String login = '/login';
  static const String category = '/category';
  static const String profile = '/profile';

  static Map<String, WidgetBuilder> routes = {
    home: (context) => const MainPage(),
    // 其他路由配置将在这里添加
  };

  static Route<dynamic>? onGenerateRoute(RouteSettings settings) {
    // 处理动态路由
    return null;
  }

  static Route<dynamic>? onUnknownRoute(RouteSettings settings) {
    return MaterialPageRoute(
      builder: (context) => Scaffold(
        appBar: AppBar(
          title: const Text('页面未找到'),
        ),
        body: const Center(
          child: Text('404 - 页面不存在'),
        ),
      ),
    );
  }
} 